const { getVillageCollectiveList } = require('../models/VillageCollective');

// 获取村集体列表
const getVillageCollective = async (req, res) => {
  try {
    const villageCollectives = await getVillageCollectiveList();
    res.json(villageCollectives);
  } catch (error) {
    console.error('获取村集体列表出错:', error);
    res.status(500).json({ message: '服务器内部错误' });
  }
};

module.exports = getVillageCollective;